--[[1游戏服务]]----------------------------------------------------------- class---------------------------------------------------------local Service = class("Chess")function Service:ctor(name)    self:register()endfunction Service:register()    self:callback('start', self.onStart)    self:callback('close', self.onClose)endfunction Service:onStart()    print("onStart")    g.handler = new("games.chess.handler")    g.desk = new("games.chess.desk")    g.rule = new("games.chess.rule")    g.user_manager = new("games.common.user_manager")    g.com_handler = new("games.common.handler")    g.handler:onStart()    return trueendfunction Service:onClose()    print("onClose")    return trueendreturn Service